home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / opussdk / include / dopus / appicon.h next >
C/C++ Source or Header  |  1996-08-28  |  3KB  |  87 lines

  1. #ifndef _DOPUS_APPICON
  2. #define _DOPUS_APPICON
  3.  
  4. /*****************************************************************************
  5.  
  6.  AppIcon, etc
  7.  
  8.  *****************************************************************************/
  9.  
  10. #ifndef WORKBENCH_WORKBENCH_H
  11. #include <workbench/workbench.h>
  12. #endif
  13.  
  14. #define DAE_Local        TAG_USER + 0    // Add to DOpus only, not WB
  15. #define DAE_SnapShot        TAG_USER + 1    // Supports snapshot
  16. #define DAE_Menu        TAG_USER + 2    // Menu item
  17. #define DAE_Close        TAG_USER + 3    // Close item
  18. #define DAE_Background        TAG_USER + 4    // Background colour
  19. #define DAE_ToggleMenu        TAG_USER + 5    // Toggle item
  20. #define DAE_ToggleMenuSel    TAG_USER + 6    // Toggle item (selected)
  21. #define DAE_Info        TAG_USER + 7    // Supports Information
  22. #define DAE_Locked        TAG_USER + 8    // Position locked
  23. #define DAE_MenuBase        TAG_USER + 9    // Menu ID base
  24.  
  25.  
  26. APTR FindAppWindow(struct Window *);
  27. struct MsgPort *AppWindowData(APTR,ULONG *,ULONG *);
  28.  
  29.  
  30. // Messages sent from AppIcons
  31.  
  32. #define MTYPE_APPSNAPSHOT    0x3812        // Snapshot message
  33.  
  34. struct AppSnapshotMsg
  35. {
  36.     struct AppMessage    ap_msg;        // Message
  37.     long            position_x;    // Icon x-position
  38.     long            position_y;    // Icon y-position
  39.     struct IBox        window_pos;    // Window position
  40.     unsigned long        flags;        // Flags
  41.     long            id;        // ID
  42. };
  43.  
  44. #define APPSNAPF_UNSNAPSHOT    (1<<0)        // Set "no position"
  45. #define APPSNAPF_WINDOW_POS    (1<<1)        // Window position supplied
  46. #define APPSNAPF_MENU        (1<<2)        // Menu operation
  47. #define APPSNAPF_CLOSE        (1<<3)        // Close command
  48. #define APPSNAPF_HELP        (1<<4)        // Help on a command
  49. #define APPSNAPF_INFO        (1<<5)        // Information command
  50.  
  51.  
  52. // Change AppIcons
  53.  
  54. void ChangeAppIcon(APTR,struct Image *,struct Image *,char *,ULONG);
  55. long SetAppIconMenuState(APTR,long,long);
  56.  
  57. #define CAIF_RENDER    (1<<0)
  58. #define CAIF_SELECT    (1<<1)
  59. #define CAIF_TITLE    (1<<2)
  60. #define CAIF_LOCKED    (1<<3)
  61. #define CAIF_SET    (1<<4)
  62. #define CAIF_BUSY    (1<<5)
  63. #define CAIF_UNBUSY    (1<<6)
  64.  
  65.  
  66. // AppWindow messages
  67.  
  68. typedef struct _DOpusAppMessage
  69. {
  70.     struct AppMessage    da_Msg;        // Message
  71.     Point            *da_DropPos;    // Drop array
  72.     Point            da_DragOffset;    // Mouse pointer offset
  73.     ULONG            da_Flags;    // Flags
  74.     ULONG            da_Pad[2];
  75. } DOpusAppMessage;
  76.  
  77. #define DAPPF_ICON_DROP        (1<<16)        // Dropped with icon
  78.  
  79. DOpusAppMessage *AllocAppMessage(APTR,struct MsgPort *,short);
  80. BOOL CheckAppMessage(DOpusAppMessage *);
  81. void FreeAppMessage(DOpusAppMessage *);
  82. BOOL GetWBArgPath(struct WBArg *,char *,long);
  83. void ReplyAppMessage(DOpusAppMessage *);
  84. BOOL SetWBArg(DOpusAppMessage *,short,BPTR,char *,APTR);
  85.  
  86. #endif
  87.